package com.xrui.hbase.impl;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.client.HTableInterface;

import java.io.IOException;

/**
 * Factory for HTableInterface instances.
 * <p>
 * This interface exists because the HBase HTableInstanceFactory doesn't throw IOException.
 */
public interface HTableInterfaceFactory {
    /**
     * Creates a new HTableInterface instance.
     *
     * @param conf           The configuration for the HBase cluster.
     * @param hbaseTableName The name of the HBase table to create a connection to.
     * @return a new HTableInterface for the specified table.
     * @throws IOException on I/O error.
     */
    HTableInterface create(Configuration conf, String hbaseTableName) throws IOException;
}
